
#ifndef _BPIXMAP_H_
#define _BPIXMAP_H_

#include <BRect>
#include <BEvent>
#include <BTexture>

namespace BWE
{
	class BWidget;
	class BImage;

	class IPixmap : public BTexture
	{
	public:
		IPixmap();
		~IPixmap();

		void setSize(const BSize& size);
		void setSize(int width, int height);
		const BSize& size() const;

		bool update();
		virtual bool bind() const;

	public:
		BSize			_size;
		BColor			_bgColor;
		bool			_dirty;
		GLuint			_fbo;
		GLuint			_rbo_depth;
		GLuint			_rbo_stencil;

	};

	typedef BHolder<IPixmap>	IPixmapHolder;
}

#endif
